/**
 * 
 */
package org.gos.mission.dao;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;

import org.gos.mission.domain.User;
import org.gos.mission.util.DB;

/**
 * @author tonyhai
 *
 */
public class UserDaoMySQLImpl {

	public List<User> findFriends(Connection conn, User user){
		List<User> users = new ArrayList<User>();
		String sql = "select *  from t_friends";
		Statement stmt = DB.getStatement(conn);
		ResultSet rs = DB.getResultSet(stmt, sql);
		try {
			while(rs.next()){
				User u = new User();
				users.add(u);
			}
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		} finally{
			DB.close(rs);
			DB.close(stmt);
		}
		return users;
	}
}
